There is known a template matching method in which the position of a pattern is specified based on the degree of coincidence between an image of a sample and a reference image called a template in order to measure and inspect a fine target on the sample. An example of the template matching method has been described in Patent Literature 1 and Non-Patent Literature 1. Moreover, a method for generating a template for template matching based on design data of a semiconductor device has been described in Patent Literature 2.
Further, a method for automatically extracting a characteristic pattern suitable for a template from design data has been disclosed in Patent Literature 3. In addition, a method for generating a template based on design data of a plurality of layers subjected to different processings in order to generate a template on which lower layer information not expressed in design data of a specific layer is reflected in template matching using an image with an optical microscope equipped in a scanning electron microscope used for measurement of a semiconductor device has been described in Patent Literature 4.
A production process for producing a semiconductor device by superposing a plurality of layers of processings on one another has been described in Non-Patent Literature 2.